package com.job51.hro.datacheckservice.config;

import com.job51.hro.datacheckservice.dto.config.LogScaner;
import com.job51.hro.datacheckservice.dto.config.TiaojiNotice;
import com.job51.hro.datacheckservice.dto.config.WechatRobot;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Component;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author pengfei.ma
 * @create 2022/6/15
 * @since 1.0.0
 */
@Slf4j
@Component
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public class CommonConfig {
    @Bean
    @ConfigurationProperties(prefix = "errorlog.logscaner")
    public LogScaner logScanerInject(){
        return  new LogScaner();
    }

    @Bean
    @ConfigurationProperties(prefix = "tiaojinotice")
    public TiaojiNotice tiaojiNoticeInject(){
        return  new TiaojiNotice();
    }

    @Bean
    @ConfigurationProperties(prefix = "wechatrobot")
    public WechatRobot wechatRobotInject(){
        return  new WechatRobot();
    }
}
